<nz-card
  style="width: 100%; height: calc(100vh - 100px)"
  nzTitle="历史记录"
  [nzExtra]="extraTemplate"
>
  <div (selectstart)="selectStart()">
    <nz-list [nzLoading]="initLoading">
      <nz-list-item *ngFor="let item of histories">
        <ng-container>
          <div class="row-item">
            <div class="item-method">
              <div class="method-bg">
                {{ item.method }}
              </div>
            </div>
            <div class="item-center" (dblclick)="sendHistory(item)">
              <div class="item-title">{{ item.createTime }}</div>
              <div class="item-url">{{ item.url }}</div>
            </div>
            <div class="item-more">...</div>
          </div>
        </ng-container>
      </nz-list-item>
      <nz-list-empty *ngIf="histories.length === 0"></nz-list-empty>
    </nz-list>
  </div>
</nz-card>

<ng-template #extraTemplate>
  <a (click)="refresh()">刷新</a>
  <a style="margin-left: 10px" (click)="clearAll()">清空记录</a>
</ng-template>
